fn main() {
    println!("Hello, world!");
    let s = String::from("Hello World");
    let hello = &s[..5];
    let world = &s[6..];
    let whole = &s[..];

    println!("{}, {}", hello, world);
    println!("{}", whole);
}

fn first_world(s:&str) -> &str {
    let bytes = s.as_bytes();
    for (i, &item) in bytes.iter().enumerate() {
        if item == b' ' {
            return &s[..i];
        }
    }
    &s[..]
}